/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication1;

import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.widgets.Canvas;

/**
 *
 * @author Oren
 */
public class Aibo extends BasicRobot {
    String localType = "Aibo";

    public Aibo(String name){
        super.speedLimit=50;
    }
    public Aibo(){
    super.speedLimit=50;
    }

    public void setType(String type)
    {
        localType = type.concat(" "+localType);

    }
    public String getType()
    {

         return localType;
     }
     public void paint(PaintEvent e){
            Canvas c=(Canvas)e.widget;	// get the canvas

            // make a general function ?
            int maxX = c.getSize().x;	// max size
            int maxY = c.getSize().y;
            int mx=maxX/2,my=maxY/2;	// mid point as (0,0)
            int myX = mx + super.getCurrentPosition().x;	// set the current position
            int myY = my - super.getCurrentPosition().y;	// set the current position


            super.paint(e);
            e.gc.drawString(getType(),myX+13, myY,true);

    }


    }
